package com.woniuxy.springboot01.service;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @Author author
 * @Create 2023-09-07 15:34
 * 定义切面类
 */
@Component
@Aspect
public class MyAspect {

    @Before("execution(* com.woniuxy.springboot01.service.*.do*(..))")
//    @Before("execution(* *(..))")
    public void before(){
        System.out.println("前置增强");
    }
    @After("execution(* com.woniuxy.springboot01.service.*.do*(..))")
    public void after(){
        System.out.println("后置增强");
    }

}
